/*********************
* Author:Dzlua
* QQ:505544956
* time:2016/07/12
*/
#ifndef __EDUI_LOG_H__
#define __EDUI_LOG_H__

#include "../defines.h"

EDUI_NAMESPACE_BEGIN

struct Rect;
EDUI_API void Log(const char *fmt, ...);
EDUI_API void Logf(const char *fmt, ...);
EDUI_API void Log(const Rect* rc, const char* msg = 0);

// print fmt only in debug type. 
EDUI_API void LogDebug(const char *fmt, ...);
EDUI_API void LogDebugf(const char *fmt, ...);
EDUI_API void LogDebug(const Rect* rc, const char* msg = 0);

EDUI_API void _EDUI_Assert(const char* exp, const char* file, int line, const char* fun, const char *fmt = 0, ...);

#define Assert(exp, ...){\
    if(!(exp)){\
        _EDUI_Assert(#exp, __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);\
    }\
}

EDUI_NAMESPACE_END

#endif